<!-- ------------------------------------------------------------------------- -->
<!-- ------------------------------------------------------------------------- -->
<!-- ---------------------- 流调管理--密接人员管理 ---------------------------- -->
<!-- ------------------------------------------------------------------------- -->
<!-- ------------------------------编辑的tag---------------------------------- -->
<!-- -------------------------编辑的tag--关联次密接人员信息---------------------- -->





<template>
  <div class="box">
    <div class="form-box">
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-row>
          <el-col :span="8"
            ><div class="grid-content ep-bg-purple" />
            <el-form-item size="large">
              <div class="form-text">姓名:</div>
              <el-input
                v-model="formInline.user"
                placeholder="请输入"
                style="width: 350px"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8"
            ><div class="grid-content ep-bg-purple-light" />
            <el-form-item size="large">
              <div class="form-text">性别:</div>
              <el-select
                v-model="formInline.region"
                placeholder="请选择"
                style="width: 350px"
              >
                <el-option label="Zone one" value="shanghai" />
                <el-option label="Zone two" value="beijing" />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8"
            ><div class="grid-content ep-bg-purple" />
            <el-form-item size="large">
              <div class="form-text">身份证号:</div>
              <el-input
                v-model="formInline.user"
                placeholder="请输入"
                style="width: 350px"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24"
            ><div class="grid-content ep-bg-purple-dark" />
            <el-form-item size="large">
              <div class="form-text">联系电话:</div>
              <el-input
                v-model="formInline.user"
                placeholder="请输入"
                style="width: 350px"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item size="large">
          <el-button type="primary" @click="onSubmit">查询</el-button>
          <el-button @click="onSubmit">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="btn-box">
      <el-button type="primary" style="width: 100px">新增</el-button>
    </div>

    <!-- 表格 -->
    <div class="table-box">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="id" label="序号" width="100" align="center" />
        <el-table-column prop="name" label="姓名" width="100" align="center" />
        <el-table-column prop="sex" label="性别" align="center" />
        <el-table-column prop="age" label="年龄" align="center" />
        <el-table-column prop="postId" label="身份证号/护照号" align="center" />
        <el-table-column prop="tel" label="联系方式" align="center" />
        <el-table-column prop="address" label="现住住址" align="center" />
        <el-table-column label="操作" width="100" align="center">
          <template #default>
            <el-button link type="primary" size="small" @click="handleClick"
              >编辑</el-button
            >
            <el-button link type="primary" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <!-- 分页 -->
    <div class="table-footer">
      <div class="demo-pagination-block">
        <el-pagination
          v-model:current-page="currentPage4"
          v-model:page-size="pageSize4"
          :page-sizes="[15, 20, 25, 30]"
          :small="small"
          :disabled="disabled"
          :background="background"
          layout="total,  prev, pager, next,sizes, jumper"
          :total="50"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        />
      </div>
    </div>

    <!-- 按钮 -->
    <div style="display:flex;width:90%; height: 100px;">
      <el-button style="width:100px;">取消</el-button>
      <el-button type="primary" @click="onSubmit" style="width:100px;">确定</el-button>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive,ref } from "vue";
export default defineComponent({
  name:'AssociativeTightKnit',
  setup() {
    const formInline = reactive({
      user: "",
      region: "",
    });

    const onSubmit = () => {
      console.log("submit!");
    };
    const tableData = [
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
      {
        id: "2016-05-03",
        name: "Tom",
        sex: "男",
        age: "15",
        postId: "510124",
        tel: "135",
        address: "成都",
        tab: "密接",
      },
    ];
    const handleClick = ()=>{}

    // 分页
    const currentPage4 = ref(4);
    const pageSize4 = ref(10);
    const small = ref(false);
    const background = ref(true);
    const disabled = ref(false);
    //切换页面数据数量
    const handleSizeChange = (val: number) => {
      console.log(`${val} items per page`);
    };
    //页面跳转输入
    const handleCurrentChange = (val: number) => {
      console.log(`current page: ${val}`);
    };

    return { formInline, onSubmit, tableData,currentPage4,pageSize4,small,background,disabled,handleSizeChange,handleCurrentChange,handleClick };
  },
});
</script>

<style scoped lang="less">
.box {
  width: 100%;
  background-color: #fff;
  display: flex;
  justify-content: center;
}
.form-box {
  width: 90%;
  padding-top: 50px;
}
.form-text {
  width: 80px;
}
.btn-box {
  width: 90%;
  display: flex;
}
.table-box {
  width: 90%;
  display: flex;
  padding-top: 40px;
}
.table-footer {
  width: 90%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
</style>
